package com.qf.business.classes.controller;

import com.qf.data.base.r.R;
import com.qf.data.base.r.Rs;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/cls")
@Slf4j
public class ClsController {

    @RequestMapping("/get")
    public R query(HttpServletRequest request,Integer cid){
        log.info("班级查询：{}", cid);

        String uid = request.getHeader("uid");
        System.out.println("班级登陆凭证====》"+uid);
        if (cid == 5) {
            try {
                Thread.sleep(900);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        return Rs.create("一年一班");
    }
}
